Skip to content

refactor: resolve reported VPTO codecheck findings - #1355

Merged
zhangstevenunity merged 10 commits into
hw-native-sys:mainfrom
HecreReed:codex/fix-materialize-memref-view-codecheck
Aug 28, 2026
Merged

refactor: resolve reported VPTO codecheck findings#1355
zhangstevenunity merged 10 commits into
hw-native-sys:mainfrom
HecreReed:codex/fix-materialize-memref-view-codecheck

Conversation

@HecreReed

@HecreReed HecreReed commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

Scope

This PR only addresses the supplied codecheck findings in:

  • lib/PTO/Transforms/VPTOBufferMaterialization.cpp
  • lib/PTO/Transforms/VPTOCANN900LLVMEmitter.cpp and its new private implementation units

Changes

  • Simplify memref-view materialization while preserving tile and layout semantics.
  • Add braces to the reported control-flow statements and replace the flagged getS accessors.
  • Remove the file-wide warning suppression and reuse checked shifted-field packing helpers.
  • Reduce the reported Mad, VCVT, load-distribution, and lowering-path complexity with focused helpers and table-driven dispatch.
  • Split the CANN 9.0 emitter into cohesive translation units; every resulting .cpp remains below 2,000 NBNC lines.
  • Preserve all 253 lowering-pattern registrations across the split.
  • Restore FP8/HIF8 MAD dispatch coverage exposed by simulator CI.

Validation

  • git diff --check
  • Lizard: 559 functions checked, no function above 50 lines or cyclomatic complexity 20.
  • Remote LLVM 19 build: ninja -C build -j64 PTOASPythonPackage
  • Focused remote regression: mad_hif8 VPTO emission passed.
  • Remote regression suite: 1,844 passed, 1 unsupported, 0 failed (ninja -C build -j64 check-pto).

@HecreReed
HecreReed marked this pull request as ready for review August 26, 2026 08:38
@HecreReed
HecreReed marked this pull request as draft August 26, 2026 09:46
@HecreReed HecreReed changed the title refactor: simplify memref view materialization refactor: resolve reported VPTO codecheck findings Aug 26, 2026
@HecreReed
HecreReed marked this pull request as ready for review August 27, 2026 16:03
@HecreReed
HecreReed marked this pull request as draft August 27, 2026 16:07
@HecreReed
HecreReed marked this pull request as ready for review August 28, 2026 00:46
@HecreReed
HecreReed marked this pull request as draft August 28, 2026 03:22
@HecreReed
HecreReed marked this pull request as ready for review August 28, 2026 04:19
@HecreReed
HecreReed marked this pull request as draft August 28, 2026 06:04
@HecreReed
HecreReed marked this pull request as ready for review August 28, 2026 06:30
@zhangstevenunity
zhangstevenunity merged commit 8564d0c into hw-native-sys:main Aug 28, 2026
12 checks passed
@reedhecre

Copy link
Copy Markdown
Contributor

A3 板测完成(有跳过)

  • 触发方式:merged
  • 源码提交:8564d0c73c7a
  • 结果汇总:OK 323 / FAIL 0 / SKIP 29
  • 日志:/home/zhongxuan/ptoas-board-monitor/runtime/logs/20260828_015919_merged_pr1355.log
  • 结果 TSV:/home/zhongxuan/ptoas-board-monitor/runtime/logs/20260828_015919_merged_pr1355.tsv

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants